package com.example.mobile2021606127cxz0510homework.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.fragment.app.Fragment;

import com.example.mobile2021606127cxz0510homework.R;


public class UserInforFragment extends Fragment {


    private ImageView imageView;
    private TextView tvMainUser;
    private TextView tvMainName;
    private TextView tvMainGender;
    private TextView tvMainPhone;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_user_infor, container, false);
        initView(view);

        return view;
    }

    @Override
    public void onStart() {
        super.onStart();
        tvMainUser.setText("用户名：user1");
        tvMainName.setText("姓 名：陈锡镇");
        tvMainGender.setText("性 别：男");
        tvMainPhone.setText("手 机：15975118906");
    }

    private void initView(View view) {
        imageView = (ImageView) view.findViewById(R.id.imageView);
        tvMainUser = (TextView) view.findViewById(R.id.tv_main_user);
        tvMainName = (TextView) view.findViewById(R.id.tv_main_name);
        tvMainGender = (TextView) view.findViewById(R.id.tv_main_gender);
        tvMainPhone = (TextView) view.findViewById(R.id.tv_main_phone);
    }
}